<?php

namespace App\Http\Controllers\Home;

use App\Http\Model\Article;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class IndexController extends Controller
{
    public function index()
    {
        $data = Article::paginate(4);
        return view('home.index', ['data'=>$data]);
    }
    public function detail($art_id)
    {
        $info = Article::where('art_id','=',$art_id)->first();
        return view('home.detail', ['info'=>$info]);
    }
}
